﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IMLibrary.FTPLibrary;
namespace Ourmsg.FileTransmit
{
    public class FtpFileClient
    {
        public FtpFileClient(string serverIP, int port, bool isSend,string userID,string Password)
        {
            FTPClient home = new FTPClient();
            home.ConnectionMode = ConnectionMode.Passive; 
            //home.OnFileTransfer += (totalTransferedBytes) =>
            //{
            //    double result = totalTransferedBytes * 100 / size;
            //    this.Invoke(new delegateOnFileTransfer(OnFileTransfer), (int)result);
            //}; 
            ////home.OnClientCommand += (command) => { Console.Write(command); };
            //home.OnServerResponse += (command) => { Console.Write(command); };
            ////home.OnSpeed += (ftp) => { this.Invoke(new delegateOnSpeed(OnSpeed), ftp.Speed(SpeedPerSecond.KiB).ToString()); };
            //home.Open(host, port);
            //home.Login(username, pass);
            //FileStream fs = new FileStream(op.FileName, FileMode.Open, FileAccess.Read);
            //size = fs.Length;
            //home.Upload(op.SafeFileName, ref fs);
            //home.LogOut();
        }
    }
}
